Unit 4 Exercise 1
Exercise 1: Resources
Objective
To use a Resource in order to prevent multiple jobs from kicking off at the same time.
Summary
Utilizing a Resource called TrainingResource with a max value of 4, you will prevent three jobs from kicking off at the same time. Two of the jobs will require 2 resources each and the third job will need all four resources.
You will then have each job trigger a notification, so that you know how many resources are in use at the time each job runs.
Instructions
Create the Resource
- In Library > Administration, select Resources.
- Click the Add button.
- In the Resources pop-up:
- In the Name field, enter
TrainingResource
. - In the Description field, enter in some documentation.
- In the Maximum field, enter a value of
4
. - Click the Save button.
- Click Back.
Create the Schedule
- In Library > Administration, select Master Schedules.
- Click the Add button.
- On the Master Schedule Definition screen:
- In the Schedule Name field, enter
My Resource Schedule
. - Add Documentation to your Schedule.
- Monday through Sunday are working days
- Do NOT use the Master Holiday Calendar.
- Auto Build
7
days in advance for1
days - Auto Delete
7
days ago - Click the Save button.
- Click Back.
- Select My Resources Schedule in the Schedule List,
- Click View.
Create the Jobs
- Select Add Job button in the side menu.
- On the Master Job Definition screen,
- In the Name field, enter
Use 2 Job A
. - In the Job Type drop down, select Windows.
- In the Machine drop down, select SMATraining
- In the User ID drop down, select SMATRAINING\SMAUSER
- In the Command Line field, enter
"C:\Program Files\OpConxps\MSLSAM\genericp.exe" -t20
. Remember to user properties where acceptable. - Click Save.
- Click the Lock icon to enter Admin Mode.
- In the Documentation section, add some documentation.
- In the Frequency section, add the Mon-Sun-O Frequency.
- Click Back.
- Utilizing the Copy function, copy job Use 2 Job A to create Use 2 Job B and Use 4 Job.
Create the Resource Dependency
- In Studio, select Use 2 Job A
- In the side panel, select Add Resource Dependency
- In the Resource pop-up:
- In the Recourse drop down, select TrainingResource.
- In the Value textbox, enter
2
. - Click the Save button
- Click the Save button in Master Job Definition
- Repeat Steps 18-20 to add the Resource Dependency of 2 to Use 2 Job B.
- Repeat Steps 18-20 to add the Resource Dependency of 4 to Use 4 Job.
- Close Library
- Close Studio.
Create the Notification
- In Library > Management, select Notification Triggers.
- Select Manager Groups.
- On the Manage Groups screen, click Add.
- In the Name field, enter
ExerciseResource
- In the Type dropdown, select Schedule.
- In the Schedule List, select My Resource Schedule.
- Click Save.
- Return to the Notification Triggers main screen.
- Click Add.
- In the bottom of the Notification Triggers screen:
- In the Group Name dropdown list, select ExerciseResource.
- In the Trigger Name dropdown list, select Job Running.
- Click the + button for an Email alert.
- In the Email pop-up window:
- In the To field, enter
smauser@congo.local
or property if you created one. - In the Subject field, enter
Resources in Use for TrainingResource when [[$JOB NAME]] is running
- In the Message field, enter
Number of Resources for resource TrainingResource => [[RU.TrainingResource]]/[[RM.TrainingResource]]
- Click the OK button.
- In the To field, enter
- Click the Save button.
- Close Library.
Build the Schedule
- Build the Schedule Released for today and view the Schedule and Job results in Processes.
- Be sure the My Resources Schedule is Completed
- Open Thunderbird and check the inbox. You should find
3
new emails. - Close Operations